﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TweetMemeNET
{
    /// <summary>
    /// Used to retrieve comments for a specific URL
    /// </summary>
    public class TweetMemeCallComments : TweetMemeCallBase
    {
        int _page = 1;

        public TweetMemeCallComments(string siteUrl)
            : base(siteUrl)
        {

        }

        public TweetMemeCallComments(string siteUrl, int page)
            : base(siteUrl)
        {
            _page=page;
        }

        protected override string GetTweetMemeApiUrl()
        {
            return string.Format(TweetMemeConstants.URL_BASE_COMMENTS, SiteURL);
        }

        protected override ITweetMemeResult HandleResult(string xmlResult)
        {
            TweetMemeResultComments result = new TweetMemeResultComments(xmlResult);

            Result=result;

            return result;
        }

        public new TweetMemeResultComments Result
        {
            get
            {
                return (TweetMemeResultComments)base.Result;
            }
            protected set
            {
                base.Result = (ITweetMemeResult)value;
            }
        }
    }
}
